Skip to content

,Android.Views.View})}

ReactiveViewHost() constructor

Defined in

Type: ReactiveViewHost Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll

Applies to

net10.0-android36.0

Overloads

  • 1. protected ReactiveViewHost()
  • 2. protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent)
  • 3. protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot)
  • 4. protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, Action<ReactiveViewHost<TViewModel>, View> bind)
  • 5. protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)

1. Overload

protected ReactiveViewHost()

View source

Summary: Initializes a new instance of the ReactiveViewHost class.

Remarks

This constructor performs no inflation or wiring and is AOT-safe. Derived types may assign View manually.

2. Overload

protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent)

View source

Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource.

Parameters

NameTypeDescription
ctxContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.

Remarks

        This constructor is fully AOT- and trimming-safe and performs no reflection-based auto-wireup.
        The inflated view is not attached to the parent.
        

3. Overload

protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot)

View source

Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource.

Parameters

NameTypeDescription
ctxContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.

Remarks

        This constructor is fully AOT- and trimming-safe and performs no reflection-based auto-wireup.
        

4. Overload

protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, Action<ReactiveViewHost<TViewModel>, View> bind)

View source

Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource and invoking an explicit, AOT-safe binder callback.

Parameters

NameTypeDescription
ctxContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.
bindAction, View>A callback responsible for explicitly wiring child views to the host.

Remarks

        This constructor is fully AOT-safe and avoids reflection entirely.
        

Exceptions

TypeCondition
System.ArgumentNullExceptionThrown when bind is null.

5. Overload

Attributes: [RequiresUnreferencedCode("Legacy auto-wireup uses reflection and member discovery.")] [RequiresDynamicCode("Legacy auto-wireup relies on runtime type inspection.")]

protected ReactiveViewHost(Context ctx, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)

View source

Summary: Initializes a new instance of the ReactiveViewHost class by inflating a layout resource and optionally performing reflection-based auto-wireup.

Parameters

NameTypeDescription
ctxContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.
performAutoWireupboolIf true, performs automatic wiring using reflection.
resolveStrategy[ResolveStrategy](#The member resolution strategy used during auto-wireup.

Remarks

This constructor exists for backward compatibility and is not trimming/AOT safe when performAutoWireup is true.